package com.phpxiu.app.push;


import com.tencent.TIMMessage;

/**
 * @file
 * @brief 消息加工厂
 * @author 吴金洲
 * @note  消息加工厂
 *
 */
public class MessageFactory {

    private MessageFactory() {}


    /**
     * 消息工厂方法
     */
    public static Message getMessage(TIMMessage message){
        switch (message.getElement(0).getType()){
            case Text:
            case Face:
                return new TextMessage(message);
            case Custom:
                return new CustomMessage(message);
            default:
                return null;
        }
    }



}
